import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { SeqPlayerItemHelper } from "../Public/SeqPlayerItemHelper";
type int = number;
//class SMail
    
    export  class SMail
    {
       

        public __write(arg1: SerializeStream): void
        {
            arg1.writeLong(this.mailId);
            arg1.writeInt(this.fromPlayerId);
            arg1.writeString(this.fromPlayerName);
            arg1.writeInt(this.toPlayerId);
            arg1.writeString(this.toPlayerName);
            arg1.writeString(this.title);
            arg1.writeString(this.content);
            arg1.writeInt(this.attachmentCoin);
            arg1.writeInt(this.attachmentGold);
            SeqPlayerItemHelper.write(arg1, this.playerItems);
            arg1.writeDate(this.mailDt);
            arg1.writeInt(this.type);
            arg1.writeInt(this.status);
            arg1.writeInt(this.hadAttachment);
            return;
        }

        public __read(arg1: SerializeStream): void
        {
            this.mailId = arg1.readLong();
            this.fromPlayerId = arg1.readInt();
            this.fromPlayerName = arg1.readString();
            this.toPlayerId = arg1.readInt();
            this.toPlayerName = arg1.readString();
            this.title = arg1.readString();
            this.content = arg1.readString();
            this.attachmentCoin = arg1.readInt();
            this.attachmentGold = arg1.readInt();
            this.playerItems = SeqPlayerItemHelper.read(arg1);
            this.mailDt = arg1.readDate();
            this.type = arg1.readInt();
            this.status = arg1.readInt();
            this.hadAttachment = arg1.readInt();
            return;
        }

        public /* var */mailId: number;

        public /* var */fromPlayerId: int;

        public /* var */fromPlayerName: string;

        public /* var */toPlayerId: int;

        public /* var */toPlayerName: string;

        public /* var */title: string;

        public /* var */content: string;

        public /* var */attachmentCoin: int;

        public /* var */attachmentGold: int;

        public /* var */playerItems: Array<any>;

        public /* var */mailDt: Date;

        public /* var */type: int;

        public /* var */status: int;

        public /* var */hadAttachment: int;
    }
